home *** CD-ROM | disk | FTP | other *** search
/ Elite College Girls 1 / Elite College Girls - Volume 1.iso / pc / shared.dir / 01954_Scripts 1.ls < prev    next >
Encoding:
Text File  |  1996-02-02  |  1.9 KB  |  102 lines

  1. global xWindow, gDataFile, gMiaWAvailable
  2.  
  3. on ohBoy
  4.   sound stop 1
  5.   sound stop 2
  6.   loseMiaW()
  7.   showMiaW()
  8.   if objectp(xWindow) then
  9.     go("MiaW")
  10.     tell xWindow
  11.       showImage()
  12.     end tell
  13.     pause()
  14.   else
  15.     go("File not found. Oh, well.")
  16.     put "File not found. Oh, well."
  17.   end if
  18. end
  19.  
  20. on showMiaW
  21.   if objectp(xWindow) then
  22.     open(xWindow)
  23.   else
  24.     readDataFile("Toolbox.DIR")
  25.     if gMiaWAvailable = 1 then
  26.       set xWindow to window "Tools"
  27.       set the rect of xWindow to rect(0, 431, 640, 456)
  28.       set the fileName of xWindow to "Toolbox.DIR"
  29.       set the titleVisible of xWindow to 0
  30.       set the modal of xWindow to 0
  31.       open(xWindow)
  32.     else
  33.       go("File not found. Oh, well.")
  34.       put "File not found. Oh, well."
  35.     end if
  36.   end if
  37. end
  38.  
  39. on hideMiaW
  40.   if objectp(xWindow) then
  41.     close(xWindow)
  42.   else
  43.     do("nothing")
  44.   end if
  45. end
  46.  
  47. on loseMiaW
  48.   if objectp(xWindow) then
  49.     forget(xWindow)
  50.   end if
  51. end
  52.  
  53. on getCenteredRect theRectWidth, theRectHeight
  54.   set theRectLeft to ((the stageLeft + the stageRight) / 2) - (theRectWidth / 2)
  55.   set theRectTop to ((the stageTop + the stageBottom) / 2) - (theRectHeight / 2)
  56.   return rect(theRectLeft, theRectTop, theRectLeft + theRectWidth, theRectTop + theRectHeight)
  57. end
  58.  
  59. on replyYes
  60.   hideMiaW()
  61.   continue()
  62.   go(marker(1))
  63. end
  64.  
  65. on replyNo
  66.   hideMiaW()
  67.   continue()
  68.   go(marker(1))
  69. end
  70.  
  71. on MiawYES whichSprite
  72.   if legalButton(whichSprite) = 1 then
  73.     go(1)
  74.     tell the stage
  75.       replyYes()
  76.     end tell
  77.   else
  78.     go(the frame)
  79.   end if
  80. end
  81.  
  82. on MiawNO whichSprite
  83.   if legalButton(whichSprite) = 1 then
  84.     go(1)
  85.     tell the stage
  86.       replyNo()
  87.     end tell
  88.   else
  89.     go(the frame)
  90.   end if
  91. end
  92.  
  93. on readDataFile whichFile
  94.   set gMiaWAvailable to 0
  95.   set gDataFile to FileIO(mnew, "read", the pathName & whichFile)
  96.   if objectp(gDataFile) = 0 then
  97.     set gMiaWAvailable to 0
  98.   else
  99.     set gMiaWAvailable to 1
  100.   end if
  101. end
  102.